package com.laihui.activity;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.laihui.MainActivity;
import com.laihui.MyApplication;
import com.laihui.activity.R;
import com.laihui.base.BaseActivity;
import com.laihui.view.TopBar;

import java.text.DecimalFormat;

import butterknife.BindView;
import butterknife.OnClick;

public class InvestSuccessActivity extends BaseActivity {

    @BindView(R.id.topbar)
    TopBar topbar;
    @BindView(R.id.tv_invest_title)
    TextView tvInvestTitle;
    @BindView(R.id.tv_apr)
    TextView tvApr;
    @BindView(R.id.tv_invest_money)
    TextView tvInvestMoney;
    @BindView(R.id.tv_type)
    TextView tvType;
    /*@BindView(R.id.tv_earnings)
    TextView tvEarnings;*/
    @BindView(R.id.btn_submit)
    Button btnSubmit;
    private Activity mActivity;
    private MyApplication application;
    private DecimalFormat df = new DecimalFormat("0.00");



    @Override
    public void init() {
        mActivity = InvestSuccessActivity.this;
        application = (MyApplication) getApplication();
        topbar.setOnTopbarClickListener(new TopBar.topbarClickListener() {
            @Override
            public void leftClick() {
                startActivity(new Intent(mActivity, MainActivity.class));
            }

            @Override
            public void rightClick() {

            }
        });

    }
    @Override
    protected void onDestroy() {
        super.onDestroy();

    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_invest_success;
    }

    @Override
    public Activity bindActivity() {
        return this;
    }


    @OnClick(R.id.btn_submit)
    public void onClicked(View view) {
        switch (view.getId()){
            case R.id.btn_submit:
                startActivity(new Intent(mActivity,MainActivity.class));
                finish();
                break;
        }
    }
}
